<template>
	<view class="">
		<view class="nav-back">		
			<top-heigth :backTitle="backTitle"></top-heigth>
		</view>
		
		<view v-if="list.length == 0" class="kong-box"><!--  -->
			<uv-empty mode="" text="还没有被邀请呦~" icon="/static/image/kong-yao.png"></uv-empty>
		</view>
		<view class="content-box">
			<view class="public-box2 m-t24" style="padding-top: 0; padding-bottom: 0;">
				<view class="invite-box" v-for="item in list">
					<view class="invite-font">
						{{item.userMobile}}
					</view>
					<view class="complaint-top">
						<view class="complaint-top-img">
							<view class="img"><image :src="item.userCover" mode="widthFix"></image></view>
							<view style="width: 230rpx;">用户：{{item.userName}}</view>
							<view>{{(item.createTime).substring(0,10)}}</view>
						</view>
						<view class="complaint-top-r red"></view>
					</view>
				</view>
				<!-- <view class="invite-box">
					<view class="invite-font">
						服务名称服务名称服务名称服务名称服务名称
					</view>
					<view class="complaint-top">
						<view class="complaint-top-img">
							<view class="img"><image src="/static/image/detail.jpg" mode=""></image></view>
							<view style="width: 230rpx;">技师：李尖尖</view>
							<view>2023.3.17</view>
						</view>
						<view class="complaint-top-r red">+99</view>
					</view>
				</view> -->
			</view>
			
		</view>
	</view>
</template>

<script>
	import TopHeigth from '@/components/TopHeigth.vue'
	
	export default {
		data() {
			return {
				backTitle:"邀请记录",
				userInfo: uni.getStorageSync('userInfo'),
				list:[],
			}
		},
		components: { TopHeigth },
		onLoad() {
			this.getInvite()
		},
		methods: {
			getInvite() {
				uni.$u.http.post('/api/shop/v1_0/tAppChannelUserRCA/turnTAppChannelUserInfo',{
					roleId: 5,
					userPhone: this.userInfo.staffMobile
				}).then((res) => {
					uni.$u.http.post('/api/shop/v1_0/tAppChannelRCA/turnTAppChannelInfo',{
						roleId: 5,
						memberId: res.data.id
					}).then((res) => {
						uni.$u.http.post('/api/shop/v1_0/tAppUserRCA/queryTAppUser',{
							channelId:res.data.id,
						}).then((res) => {
							this.list = res.aaData
						}) 
					})
				})
				
			},
		}
	}
</script>

<style lang="scss" scoped>
	@mixin flex($direction: row) {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: $direction;
	}
	.uv-nav-slot {
		@include flex;
		align-items: center;
		justify-content: space-between;
		border-width: 0.5px;
		border-radius: 100px;
		border-color: #dadbde;
		padding: 3px 7px;
		opacity: 0.8;
	}
	
	.complaint-top{
		@include flex;
		align-items: center;
		justify-content:space-between;
		font-size: 26rpx;
		.complaint-top-img{
			@include flex;
			align-items: center;
			justify-content:flex-start;
			font-size: 26rpx;
			
			.img{       
				border-radius: 40rpx;
				overflow: hidden;
				font-weight: bold;
				color: #333;
				margin-right: 16rpx;
				image{
					width: 76rpx;
					height: 76rpx;
				}
			}
		}
		.complaint-top-r{
			font-size: 24rpx;
			color: #999;
			font-weight: bold;
		}
	}
	.invite-box{
		padding: 32rpx 0;
		border-bottom: 2rpx solid #EEEEEE;
		.invite-font{
			font-size: 30rpx;
			margin-bottom: 24rpx;
		}
	}
	.public-box2{
		.invite-box:last-child{
			border-bottom:none;
		}
	}
</style>
